Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce fee payment #3294

Merged
merged 15 commits into from
May 31, 2024
Merged

Enforce fee payment #3294

merged 15 commits into from
May 31, 2024

Conversation

grarco
Copy link
Contributor

@grarco grarco commented May 22, 2024

Describe your changes

Closes #3075.

Restructures finalize_block to collect the fees from all the transactions before executing the inner txs, putting this back in line with the validation logic of process_proposal and removing an attack vector.

Indicate on which release or other PRs this topic is based on

v0.37.0

Checklist before merging to draft

  • I have added a changelog
  • Git history is in acceptable state

Copy link

codecov bot commented May 22, 2024

Codecov Report

Attention: Patch coverage is 80.94118% with 81 lines in your changes are missing coverage. Please review.

Project coverage is 53.93%. Comparing base (6dc1612) to head (d063ac1).
Report is 2 commits behind head on main.

Files Patch % Lines
crates/node/src/shell/finalize_block.rs 84.46% 48 Missing ⚠️
crates/namada/src/ledger/protocol/mod.rs 79.80% 21 Missing ⚠️
crates/node/src/shell/governance.rs 0.00% 9 Missing ⚠️
crates/namada/src/ledger/mod.rs 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3294      +/-   ##
==========================================
+ Coverage   53.89%   53.93%   +0.04%     
==========================================
  Files         314      314              
  Lines      105704   105804     +100     
==========================================
+ Hits        56968    57069     +101     
+ Misses      48736    48735       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@grarco grarco marked this pull request as ready for review May 22, 2024 14:33
batconjurer
batconjurer previously approved these changes May 23, 2024
tzemanovic
tzemanovic previously approved these changes May 23, 2024
tzemanovic added a commit that referenced this pull request May 24, 2024
* origin/grarco/force-fee-payment:
  Fmt
  Changelog #3075
  Fixes typo
  Misc adjustments to v36
  Adds integration test for enforced fees
  Removes useless operations on wrapper transactions
  Removes useless check on tx type for reprot management
  Fixes unit tests
  Pass tx by reference in `apply_wrapper_tx`
  Removes unused wasm caches for wrapper execution
  Refactors the arguments of `dispatch_tx` for every tx type
  Cache wrapper transaction to avoid second deserialization
  Reorganizes arguments for tx execution
  Refactors tx execution of `finalize_block` into separate functions
  Fixes fee payment
@brentstone brentstone merged commit 67cddfc into main May 31, 2024
19 checks passed
@brentstone brentstone deleted the grarco/force-fee-payment branch May 31, 2024 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enforcing fee payment on transactions
4 participants